<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<SCRIPT language="javascript">
        function addRow(tableID) {
 
            var table = document.getElementById(tableID);
 
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
 
            var colCount = table.rows[0].cells.length;
 
            for(var i=0; i<colCount; i++) {
 
                var newcell = row.insertCell(i);
 
                newcell.innerHTML = table.rows[0].cells[i].innerHTML;
                //alert(newcell.childNodes);
                switch(newcell.childNodes[0].type) {
                    case "text":
                            newcell.childNodes[0].value = "";
                            break;
                    case "checkbox":
                            newcell.childNodes[0].checked = false;
                            break;
                    case "select-one":
                            newcell.childNodes[0].selectedIndex = 0;
                            break;
                }
            }
        }
 
        function deleteRow(tableID) {
            try {
            var table = document.getElementById(tableID);
            var rowCount = table.rows.length;
 
            for(var i=0; i<rowCount; i++) {
                var row = table.rows[i];
                var chkbox = row.cells[0].childNodes[0];
                if(null != chkbox && true == chkbox.checked) {
                    if(rowCount <= 1) {
                        alert("Cannot delete all the rows.");
                        break;
                    }
                    table.deleteRow(i);
                    rowCount--;
                    i--;
                }
 
            }
            }catch(e) {
                alert(e);
            }
        }
 
    </SCRIPT>
</head>

<body>
<CENTER>OWNERSHIP RECORD FORM</CENTER>
<p>PROVINCE/CITY 
  <input name="RefNo" type="text" id="textfield2" value="" size="25" />
MUNICIPALITY 
<input name="RefNo" type="text" id="textfield2" value="" size="25" />
DISTRICT 
<input name="RefNo" type="text" id="textfield2" value="" size="25" />
BARANGAY
<input name="RefNo" type="text" id="textfield2" value="" size="25" />
<BR />
Name of Owner &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
<input name="RefNo" type="text" id="textfield2" value="" size="50" />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
Address & Tel. No.
<input name="RefNo" type="text" id="textfield2" value="" size="50" />
<br />

Name of Administrator 
<input name="RefNo" type="text" id="textfield2" value="" size="50" />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
Address & Tel. No.
<input name="RefNo" type="text" id="textfield2" value="" size="50" />
</p>
<table width="100%" border="1" cellpadding="1">
  <tr align="center">
    <td width="9%" rowspan="2">PIN</td>
    <td width="6%" rowspan="2">ARP NO.</td>
    <td width="11%" rowspan="2">PROPERTY <BR /> 
    LOCATION</td>
    <td width="14%" rowspan="2">AREA</td>
    <td width="14%" rowspan="2">ASSESSED VALUE</td>
    <td height="46" colspan="2">DISPOSITION <BR />
    ACQUISITION</td>
    <td width="20%" rowspan="2">TOTAL <BR />
    CURRENT<BR />ASSESSMENT</td>
  </tr>
  <tr>
    <td width="14%">Transaction<br />
    Update <br />Code</td>
    <td width="12%">PREVIOUS <BR />
     ARP REF</td>
  </tr>
</table>
<table width="100%" border="1" cellpadding="1" id="id5">
  <tr>
    <td width="9%"><input type="checkbox" name="chk[]1"/></td>
    <td width="6%">&nbsp;</td>
    <td width="11%">&nbsp;</td>
    <td width="14%">&nbsp;</td>
    <td width="14%">&nbsp;</td>
    <td width="14%">&nbsp;</td>
    <td width="12%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
  </tr>
</table>
<table>
<tr>
          <td height="48" colspan="3"><input type="button" value="Add Row" onClick="addRow('id5')" />
    <input type="button" value="Delete Row" onClick="deleteRow('id5')" /></td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
